/* FunChat 响应式布局样式 */

/* 断点变量 */
:root {
  --breakpoint-xs: 576px;
  --breakpoint-sm: 768px;
  --breakpoint-md: 992px;
  --breakpoint-lg: 1200px;
  --breakpoint-xl: 1400px;
}

/* 容器 */
.container {
  width: 100%;
  padding-right: var(--spacing-medium);
  padding-left: var(--spacing-medium);
  margin-right: auto;
  margin-left: auto;
}

/* 响应式容器 */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* 流体容器 */
.container-fluid {
  width: 100%;
  padding-right: var(--spacing-medium);
  padding-left: var(--spacing-medium);
  margin-right: auto;
  margin-left: auto;
}

/* 网格系统 */
.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: calc(var(--spacing-medium) * -1);
  margin-left: calc(var(--spacing-medium) * -1);
}

.col {
  flex-basis: 0;
  flex-grow: 1;
  max-width: 100%;
  padding-right: var(--spacing-medium);
  padding-left: var(--spacing-medium);
}

/* 列宽度 */
.col-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
.col-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
.col-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
.col-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
.col-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

/* 小屏幕 */
@media (min-width: 576px) {
  .col-sm { flex-basis: 0; flex-grow: 1; max-width: 100%; }
  .col-sm-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-sm-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-sm-3 { flex: 0 0 25%; max-width: 25%; }
  .col-sm-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-sm-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-sm-6 { flex: 0 0 50%; max-width: 50%; }
  .col-sm-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-sm-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-sm-9 { flex: 0 0 75%; max-width: 75%; }
  .col-sm-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-sm-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

/* 中等屏幕 */
@media (min-width: 768px) {
  .col-md { flex-basis: 0; flex-grow: 1; max-width: 100%; }
  .col-md-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-md-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-md-3 { flex: 0 0 25%; max-width: 25%; }
  .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-md-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-md-6 { flex: 0 0 50%; max-width: 50%; }
  .col-md-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-md-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-md-9 { flex: 0 0 75%; max-width: 75%; }
  .col-md-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-md-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

/* 大屏幕 */
@media (min-width: 992px) {
  .col-lg { flex-basis: 0; flex-grow: 1; max-width: 100%; }
  .col-lg-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-lg-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
  .col-lg-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-lg-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
  .col-lg-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-lg-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
  .col-lg-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-lg-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-lg-12 { flex: 0 0 100%; max-width: 100%; }
}

/* 超大屏幕 */
@media (min-width: 1200px) {
  .col-xl { flex-basis: 0; flex-grow: 1; max-width: 100%; }
  .col-xl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-xl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-xl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-xl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-xl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-xl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-xl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-xl-9 { flex: 0 0 75%; max-width: 75%; }
  .col-xl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-xl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-xl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* 特大屏幕 */
@media (min-width: 1400px) {
  .col-xxl { flex-basis: 0; flex-grow: 1; max-width: 100%; }
  .col-xxl-1 { flex: 0 0 8.333333%; max-width: 8.333333%; }
  .col-xxl-2 { flex: 0 0 16.666667%; max-width: 16.666667%; }
  .col-xxl-3 { flex: 0 0 25%; max-width: 25%; }
  .col-xxl-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
  .col-xxl-5 { flex: 0 0 41.666667%; max-width: 41.666667%; }
  .col-xxl-6 { flex: 0 0 50%; max-width: 50%; }
  .col-xxl-7 { flex: 0 0 58.333333%; max-width: 58.333333%; }
  .col-xxl-8 { flex: 0 0 66.666667%; max-width: 66.666667%; }
  .col-xxl-9 { flex: 0 0 75%; max-width: 75%; }
  .col-xxl-10 { flex: 0 0 83.333333%; max-width: 83.333333%; }
  .col-xxl-11 { flex: 0 0 91.666667%; max-width: 91.666667%; }
  .col-xxl-12 { flex: 0 0 100%; max-width: 100%; }
}

/* 间距 */
.g-0 {
  margin-right: 0;
  margin-left: 0;
}

.g-0 > .col,
.g-0 > [class*="col-"] {
  padding-right: 0;
  padding-left: 0;
}

.g-1 {
  margin-right: calc(var(--spacing-mini) * -1);
  margin-left: calc(var(--spacing-mini) * -1);
}

.g-1 > .col,
.g-1 > [class*="col-"] {
  padding-right: var(--spacing-mini);
  padding-left: var(--spacing-mini);
}

.g-2 {
  margin-right: calc(var(--spacing-small) * -1);
  margin-left: calc(var(--spacing-small) * -1);
}

.g-2 > .col,
.g-2 > [class*="col-"] {
  padding-right: var(--spacing-small);
  padding-left: var(--spacing-small);
}

.g-3 {
  margin-right: calc(var(--spacing-medium) * -1);
  margin-left: calc(var(--spacing-medium) * -1);
}

.g-3 > .col,
.g-3 > [class*="col-"] {
  padding-right: var(--spacing-medium);
  padding-left: var(--spacing-medium);
}

.g-4 {
  margin-right: calc(var(--spacing-large) * -1);
  margin-left: calc(var(--spacing-large) * -1);
}

.g-4 > .col,
.g-4 > [class*="col-"] {
  padding-right: var(--spacing-large);
  padding-left: var(--spacing-large);
}

.g-5 {
  margin-right: calc(var(--spacing-xlarge) * -1);
  margin-left: calc(var(--spacing-xlarge) * -1);
}

.g-5 > .col,
.g-5 > [class*="col-"] {
  padding-right: var(--spacing-xlarge);
  padding-left: var(--spacing-xlarge);
}

/* 响应式间距 */
@media (min-width: 576px) {
  .g-sm-0 { margin-right: 0; margin-left: 0; }
  .g-sm-0 > .col, .g-sm-0 > [class*="col-"] { padding-right: 0; padding-left: 0; }
  
  .g-sm-1 { margin-right: calc(var(--spacing-mini) * -1); margin-left: calc(var(--spacing-mini) * -1); }
  .g-sm-1 > .col, .g-sm-1 > [class*="col-"] { padding-right: var(--spacing-mini); padding-left: var(--spacing-mini); }
  
  .g-sm-2 { margin-right: calc(var(--spacing-small) * -1); margin-left: calc(var(--spacing-small) * -1); }
  .g-sm-2 > .col, .g-sm-2 > [class*="col-"] { padding-right: var(--spacing-small); padding-left: var(--spacing-small); }
  
  .g-sm-3 { margin-right: calc(var(--spacing-medium) * -1); margin-left: calc(var(--spacing-medium) * -1); }
  .g-sm-3 > .col, .g-sm-3 > [class*="col-"] { padding-right: var(--spacing-medium); padding-left: var(--spacing-medium); }
  
  .g-sm-4 { margin-right: calc(var(--spacing-large) * -1); margin-left: calc(var(--spacing-large) * -1); }
  .g-sm-4 > .col, .g-sm-4 > [class*="col-"] { padding-right: var(--spacing-large); padding-left: var(--spacing-large); }
  
  .g-sm-5 { margin-right: calc(var(--spacing-xlarge) * -1); margin-left: calc(var(--spacing-xlarge) * -1); }
  .g-sm-5 > .col, .g-sm-5 > [class*="col-"] { padding-right: var(--spacing-xlarge); padding-left: var(--spacing-xlarge); }
}

/* 响应式工具 */
@media (max-width: 575.98px) {
  .hidden-xs {
    display: none !important;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .hidden-sm {
    display: none !important;
  }
}

@media (min-width: 768px) and (max-width: 991.98px) {
  .hidden-md {
    display: none !important;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .hidden-lg {
    display: none !important;
  }
}

@media (min-width: 1200px) {
  .hidden-xl {
    display: none !important;
  }
}

/* 响应式文本对齐 */
@media (min-width: 576px) {
  .text-sm-left { text-align: left !important; }
  .text-sm-center { text-align: center !important; }
  .text-sm-right { text-align: right !important; }
}

@media (min-width: 768px) {
  .text-md-left { text-align: left !important; }
  .text-md-center { text-align: center !important; }
  .text-md-right { text-align: right !important; }
}

@media (min-width: 992px) {
  .text-lg-left { text-align: left !important; }
  .text-lg-center { text-align: center !important; }
  .text-lg-right { text-align: right !important; }
}

@media (min-width: 1200px) {
  .text-xl-left { text-align: left !important; }
  .text-xl-center { text-align: center !important; }
  .text-xl-right { text-align: right !important; }
}

/* 响应式显示 */
@media (min-width: 576px) {
  .d-sm-none { display: none !important; }
  .d-sm-inline { display: inline !important; }
  .d-sm-inline-block { display: inline-block !important; }
  .d-sm-block { display: block !important; }
  .d-sm-flex { display: flex !important; }
  .d-sm-inline-flex { display: inline-flex !important; }
}

@media (min-width: 768px) {
  .d-md-none { display: none !important; }
  .d-md-inline { display: inline !important; }
  .d-md-inline-block { display: inline-block !important; }
  .d-md-block { display: block !important; }
  .d-md-flex { display: flex !important; }
  .d-md-inline-flex { display: inline-flex !important; }
}

@media (min-width: 992px) {
  .d-lg-none { display: none !important; }
  .d-lg-inline { display: inline !important; }
  .d-lg-inline-block { display: inline-block !important; }
  .d-lg-block { display: block !important; }
  .d-lg-flex { display: flex !important; }
  .d-lg-inline-flex { display: inline-flex !important; }
}

@media (min-width: 1200px) {
  .d-xl-none { display: none !important; }
  .d-xl-inline { display: inline !important; }
  .d-xl-inline-block { display: inline-block !important; }
  .d-xl-block { display: block !important; }
  .d-xl-flex { display: flex !important; }
  .d-xl-inline-flex { display: inline-flex !important; }
}

/* 响应式Flex */
@media (min-width: 576px) {
  .flex-sm-row { flex-direction: row !important; }
  .flex-sm-column { flex-direction: column !important; }
  .flex-sm-row-reverse { flex-direction: row-reverse !important; }
  .flex-sm-column-reverse { flex-direction: column-reverse !important; }
  .flex-sm-wrap { flex-wrap: wrap !important; }
  .flex-sm-nowrap { flex-wrap: nowrap !important; }
  .justify-content-sm-start { justify-content: flex-start !important; }
  .justify-content-sm-end { justify-content: flex-end !important; }
  .justify-content-sm-center { justify-content: center !important; }
  .justify-content-sm-between { justify-content: space-between !important; }
  .justify-content-sm-around { justify-content: space-around !important; }
  .align-items-sm-start { align-items: flex-start !important; }
  .align-items-sm-end { align-items: flex-end !important; }
  .align-items-sm-center { align-items: center !important; }
  .align-items-sm-baseline { align-items: baseline !important; }
  .align-items-sm-stretch { align-items: stretch !important; }
}

@media (min-width: 768px) {
  .flex-md-row { flex-direction: row !important; }
  .flex-md-column { flex-direction: column !important; }
  .flex-md-row-reverse { flex-direction: row-reverse !important; }
  .flex-md-column-reverse { flex-direction: column-reverse !important; }
  .flex-md-wrap { flex-wrap: wrap !important; }
  .flex-md-nowrap { flex-wrap: nowrap !important; }
  .justify-content-md-start { justify-content: flex-start !important; }
  .justify-content-md-end { justify-content: flex-end !important; }
  .justify-content-md-center { justify-content: center !important; }
  .justify-content-md-between { justify-content: space-between !important; }
  .justify-content-md-around { justify-content: space-around !important; }
  .align-items-md-start { align-items: flex-start !important; }
  .align-items-md-end { align-items: flex-end !important; }
  .align-items-md-center { align-items: center !important; }
  .align-items-md-baseline { align-items: baseline !important; }
  .align-items-md-stretch { align-items: stretch !important; }
}

/* 飞书特有的响应式布局 */
.lark-layout {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.lark-layout-header {
  flex: 0 0 auto;
  background-color: var(--background-color-primary);
  box-shadow: var(--shadow-small);
  z-index: 10;
}

.lark-layout-content {
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

.lark-layout-sider {
  flex: 0 0 auto;
  width: 240px;
  background-color: var(--background-color-secondary);
  border-right: 1px solid var(--border-color-normal);
  overflow-y: auto;
  transition: width 0.2s;
}

.lark-layout-sider-collapsed {
  width: 60px;
}

.lark-layout-main {
  flex: 1 1 auto;
  overflow-y: auto;
  background-color: var(--background-color-tertiary);
}

.lark-layout-footer {
  flex: 0 0 auto;
  background-color: var(--background-color-primary);
  border-top: 1px solid var(--border-color-normal);
}

/* 响应式布局 */
@media (max-width: 768px) {
  .lark-layout-sider {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .lark-layout-sider.open {
    transform: translateX(0);
  }
  
  .lark-layout-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
  }
  
  .lark-layout-overlay.open {
    display: block;
  }
}